package com.bawei.product.controller;

import com.bawei.common.core.domain.R;
import com.bawei.common.security.annotation.RequiresPermissions;
import com.bawei.product.domain.req.ProductInfoReq;
import com.bawei.product.domain.vo.ProductClassifyVo;
import com.bawei.product.service.ProductClassifyService;
import com.bawei.product.service.ProductService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import java.util.List;

@RestController
@RequestMapping("product/classify")
@Api(tags = "商品类型管理")
public class ClassifyController {

    @Autowired
    private ProductClassifyService productClassifyService;

    @GetMapping("/getAll")
    @ApiOperation("获取商品全部数据类型")
    public R<List<ProductClassifyVo>> getAll(){

        return R.ok(productClassifyService.getAll());
    }
}
